#ifndef VA_ADB_COMMAND_QUEUE_H
#define VA_ADB_COMMAND_QUEUE_H

#include <nan.h>

namespace VA
{


    class AdbCommandQueue : public std::enable_shared_from_this<AdbCommandQueue>
    {
    public:
        AdbCommandQueue(
            std::string command,
            std::shared_ptr <Nan::AsyncResource> resource,
            std::shared_ptr <Nan::Callback> callback);

        ~AdbCommandQueue();

    public:
        struct QueueInfo
        {
            bool isComplete;
            std::string data;
            std::shared_ptr<AdbCommandQueue> queue;
        };
    public:
        std::string getCommand();
        void handleComplete(bool isComplete, std::string data);
        void handleCallback(bool isComplete, std::string data);

    private:
        std::string _command;
        std::shared_ptr <Nan::Callback> _Callback;
        std::shared_ptr <Nan::AsyncResource> _resource;
        uv_async_t async;
        QueueInfo Info;

    };
}

#endif